log using "~/Desktop/JOP Replication/jop_blair.log", replace

********************************************************************************
* 								 FULL ANALYSIS								   *
********************************************************************************

clear all

ssc install reghdfe, replace
ssc install ftools, replace
ssc install carryforward, replace
ssc install grstyle, replace
ssc install outreg2, replace
ssc install coefplot, replace
ssc install ppmlhdfe, replace
ssc install cmp, replace
ssc install ghk2, replace
ssc install boottest, replace

set more off
set scheme plotplainblind
macro drop _all
est drop _all
set matsize 800
set seed 8675309

** Set Working Directory

if c(username) == "christopherblair"{
global dir "~/Desktop/JOP Replication"
global raw "${dir}/Raw Files"
global code "${dir}/Code"										
}

cd "${dir}"

else if c(username) == "youruser"{
global dir "~/Desktop/JOP Replication"
}

cd "${dir}"

********************************************************************************

do "${code}/CW Clean and Process.do"

if c(username) == "christopherblair"{
global dir "~/Desktop/JOP Replication"
global raw "${dir}/Raw Files"
global code "${dir}/Code"										
}
cd "${dir}"

do "${code}/CW Polls.do"

if c(username) == "christopherblair"{
global dir "~/Desktop/JOP Replication"
global raw "${dir}/Raw Files"
global code "${dir}/Code"										
}
cd "${dir}"

do "${code}/CW Main.do"

if c(username) == "christopherblair"{
global dir "~/Desktop/JOP Replication"
global raw "${dir}/Raw Files"
global code "${dir}/Code"										
}
cd "${dir}"

do "${code}/CW Heterogeneous.do"

clear

********************************************************************************

clear all

log off
log close
